/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package supermarket;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.NoResultException;
import javax.persistence.Query;
import javax.persistence.TypedQuery;
import javax.swing.DefaultListModel;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import model.Product;
import model.Store;
import model.StoreProduct;
import static supermarket.SuperMarket.em;

/**
 *
 * @author root
 */
public class StoresProductsForm extends javax.swing.JFrame {

    /**
     * Creates new form StoresProductsForm
     */
    
    
    
    
    public StoresProductsForm() {
        initComponents();
               
        fillComboBox(); //Εισάγει τα ονόματα των καταστημάτων στο ComboBox
        fillProductsList(); //Γεμίζει τη λίστα με όλα τα υπάρχοντα προϊόντα, αριστερά
        
        em.getTransaction().begin();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        SuperMarketPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("SuperMarketPU").createEntityManager();
        storeQuery = java.beans.Beans.isDesignTime() ? null : SuperMarketPUEntityManager.createQuery("SELECT s FROM Store s");
        storeList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : storeQuery.getResultList();
        storeQuery1 = java.beans.Beans.isDesignTime() ? null : SuperMarketPUEntityManager.createQuery("SELECT s FROM Store s");
        storeList1 = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : storeQuery1.getResultList();
        jSeparator1 = new javax.swing.JSeparator();
        jSeparator2 = new javax.swing.JSeparator();
        productQuery = java.beans.Beans.isDesignTime() ? null : SuperMarketPUEntityManager.createQuery("SELECT p FROM Product p");
        productList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : productQuery.getResultList();
        jPanel3 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jComboBox1 = new javax.swing.JComboBox();
        jScrollPane2 = new javax.swing.JScrollPane();
        jList2 = new javax.swing.JList();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        jList3 = new javax.swing.JList();
        jButton3 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel3.setBackground(java.awt.Color.orange);
        jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        jLabel5.setBackground(java.awt.Color.white);
        jLabel5.setFont(new java.awt.Font("Cantarell", 1, 36)); // NOI18N
        jLabel5.setForeground(java.awt.Color.red);
        jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/supermarket/cart.png"))); // NOI18N
        jLabel5.setText("SUPER MARKET");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(179, 179, 179)
                .addComponent(jLabel5)
                .addContainerGap(197, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel5)
                .addContainerGap())
        );

        getContentPane().add(jPanel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 12, 770, -1));

        jPanel2.setBackground(java.awt.Color.yellow);
        jPanel2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel1.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/supermarket/admin.png"))); // NOI18N
        jLabel1.setText("ΣΥΣΧΕΤΙΣΗ ΠΡΟΪΟΝΤΩΝ-ΚΑΤΑΣΤΗΜΑΤΩΝ");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(104, 104, 104)
                .addComponent(jLabel1)
                .addContainerGap(126, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addContainerGap(13, Short.MAX_VALUE))
        );

        getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 150, 770, -1));

        jPanel1.setBackground(java.awt.Color.lightGray);
        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jComboBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox1ActionPerformed(evt);
            }
        });

        jScrollPane2.setViewportView(jList2);

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/supermarket/rightButton.png"))); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/supermarket/leftButton.png"))); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jScrollPane3.setViewportView(jList3);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE))
                .addGap(32, 32, 32)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButton1)
                    .addComponent(jButton2))
                .addGap(32, 32, 32)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(69, 69, 69)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(23, Short.MAX_VALUE))
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(81, 81, 81)
                .addComponent(jButton1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jButton2)
                .addGap(39, 39, 39))
        );

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(12, 237, 770, -1));

        jButton3.setText("Επιστροφή");
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(467, 490, 142, -1));

        jButton5.setText("Ακύρωση");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(306, 490, 143, -1));

        jButton4.setText("Αποθήκευση");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(131, 490, 139, -1));

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/supermarket/super-market.jpg"))); // NOI18N
        getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(-140, 0, 950, 560));

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
        // Εμφάνιση προϊόντων του καταστήματος      
        
        TypedQuery<Store> q = em.createNamedQuery("Store.findByName", Store.class);
         q.setParameter("name",jComboBox1.getSelectedItem());

        Store store = q.getSingleResult();
        
         TypedQuery<StoreProduct> query = em.createQuery(
        "SELECT c FROM StoreProduct c WHERE c.store = :store", StoreProduct.class);
        List<StoreProduct> products = query.setParameter("store", store).getResultList();
        
        
        
        
        DefaultListModel model = new DefaultListModel();
         
        for(int i=0;i<products.size();i++){
            
            model.addElement(products.get(i).getProduct().getName());
            
        }
        jList2.setModel(model);
        
        
        fillProductsList();
        //JOptionPane.showConfirmDialog(rootPane, store.getName());
        
        
        
    }//GEN-LAST:event_jComboBox1ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // Μετακίνηση προϊόντος στη δεξιά λίστα
        
        
        //JOptionPane.showConfirmDialog(rootPane,jList3.getSelectedValue());
        
        //Εύρεση καταστήματος από το combobox
        try{
        
        TypedQuery<Store> q = em.createNamedQuery("Store.findByName", Store.class);
         q.setParameter("name",jComboBox1.getSelectedItem());

        Store store = q.getSingleResult();
        
        //Εύρεση επιλεγμένου προϊόντος από τη λίστα
        TypedQuery<Product> q1 = em.createNamedQuery("Product.findByName", Product.class);
        q1.setParameter("name", jList3.getSelectedValue());
        
        Product product = q1.getSingleResult();
        //αναζήτηση για διπλή εγγραφή
        boolean found=false;
        for(int i=0; i<jList2.getModel().getSize();i++)
        {
            jList2.setSelectedIndex(i);
            if(jList3.getSelectedValue()==jList2.getSelectedValue()){
                JOptionPane.showMessageDialog(new JFrame(),"Το προϊόν υπάρχει ήδη!");
             found = true;}
        }
            if(found==false){//Αν δεν υπάρχει διπλή εγγραφή
                
        StoreProduct storeProduct = new StoreProduct();
        
        storeProduct.setStore(store);
        storeProduct.setProduct(product);
        em.persist(storeProduct);
        
        DefaultListModel model1 = (DefaultListModel) jList3.getModel();
            Object get = model1.get(jList3.getSelectedIndex());
            
    
        
    model1.removeElement(get);

        
        
        
        jList3.setModel(model1);
        
        //JOptionPane.showMessageDialog(new JFrame(),"Το προϊόν προστέθηκε!");
        
         //Ανανέωση λίστας
        TypedQuery<Store> q5 = em.createNamedQuery("Store.findByName", Store.class);
        q5.setParameter("name",jComboBox1.getSelectedItem());

        Store store1 = q5.getSingleResult();
        
        TypedQuery<StoreProduct> query = em.createQuery(
        "SELECT c FROM StoreProduct c WHERE c.store = :store", StoreProduct.class);
        List<StoreProduct> products = query.setParameter("store", store).getResultList();
        
                
        DefaultListModel model = new DefaultListModel();
         
        for(int i=0;i<products.size();i++){
            
            model.addElement(products.get(i).getProduct().getName());
            
        }
        jList2.setModel(model);
         //Ανανέωση λίστας
        
        
            }
        
        }
        catch (NoResultException e)
        {
           JOptionPane.showMessageDialog(new JFrame(),"Επιλέξτε κατάστημα!"); 
            
        }
                
        //JOptionPane.showConfirmDialog(rootPane,q2.getSingleResult());
        
        
        
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        em.getTransaction().rollback();
          AdminManageForm adminManageForm = new AdminManageForm();
          adminManageForm.setVisible(true);
        dispose();
        
        
        
        
        
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // Αφαίρεση προϊόντος από κατάστημα
        try{
        
        //Έυρεση προϊόντος
        TypedQuery<Product> q = em.createNamedQuery("Product.findByName", Product.class);
        q.setParameter("name", jList2.getSelectedValue());
        Product product = q.getSingleResult();
        
         //Πρόσθεση στη δεξιά λίστα
        DefaultListModel model1 = (DefaultListModel) jList2.getModel();
            Object get = model1.get(jList2.getSelectedIndex());
            
             
        
        DefaultListModel model2 = (DefaultListModel) jList3.getModel();
        model2.addElement(get);
        jList3.setModel(model2);
        
        
        
        
        
        //Έυρεση κατατήματος
        TypedQuery<Store> q1 = em.createNamedQuery("Store.findByName", Store.class);
         q1.setParameter("name",jComboBox1.getSelectedItem());
        Store store = q1.getSingleResult();
        
        //Έυρεση εγγραφη στον πίνακα STORE_PRODUCT
        StoreProduct storeProduct = (StoreProduct) em.createQuery("SELECT c FROM StoreProduct c WHERE c.store=:store AND c.product=:product")
                              .setParameter("store", store)
                              .setParameter("product", product)
                              .getSingleResult(); 
        
        //Διαγραφή εγγραφής στον πίνακα STORE_PRODUCT
        
        em.remove(storeProduct);
     
        //JOptionPane.showMessageDialog(new JFrame(),"Το προϊόν αφαιρέθηκε!"); 
       
        TypedQuery<Store> q5 = em.createNamedQuery("Store.findByName", Store.class);
        q5.setParameter("name",jComboBox1.getSelectedItem());

        
       
        
        
        
        
        Store store1 = q5.getSingleResult();
        
        TypedQuery<StoreProduct> query = em.createQuery(
        "SELECT c FROM StoreProduct c WHERE c.store = :store", StoreProduct.class);
        List<StoreProduct> products = query.setParameter("store", store1).getResultList();
        
                
        DefaultListModel model = new DefaultListModel();
         
        for(int i=0;i<products.size();i++){
            
            model.addElement(products.get(i).getProduct().getName());
            
        }
        jList2.setModel(model);
        
        
        
        
        
        
        
        }
        
        catch (NoResultException e)
        {
           JOptionPane.showMessageDialog(new JFrame(),"Επιλέξτε προϊόν!"); 
            
        }
        
        
        
        
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        em.getTransaction().commit();
        JOptionPane.showMessageDialog(new JFrame(),"Οι αλλαγές αποθηκεύτηκαν!");
        AdminManageForm adminManageForm = new AdminManageForm();
          adminManageForm.setVisible(true);
        dispose();
        
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // Ακύρωση
       
        em.getTransaction().rollback();
        
        //Ανανέωση λίστας
         TypedQuery<Store> q5 = em.createNamedQuery("Store.findByName", Store.class);
         q5.setParameter("name",jComboBox1.getSelectedItem());

        Store store1 = q5.getSingleResult();
        
         TypedQuery<StoreProduct> query = em.createQuery(
        "SELECT c FROM StoreProduct c WHERE c.store = :store", StoreProduct.class);
        List<StoreProduct> products = query.setParameter("store", store1).getResultList();
        
                
        DefaultListModel model = new DefaultListModel();
         
        for(int i=0;i<products.size();i++){
            
            model.addElement(products.get(i).getProduct().getName());
            
        }
        jList2.setModel(model);
         //Ανανέωση λίστας
        fillProductsList();
        
        em.getTransaction().begin(); 
    }//GEN-LAST:event_jButton5ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(StoresProductsForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(StoresProductsForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(StoresProductsForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(StoresProductsForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new StoresProductsForm().setVisible(true);
            }
        });
    }
    
    public void fillComboBox(){//Εισάγει τα ονόματα των καταστημάτων στο ComboBox
        
        TypedQuery<Store> q = em.createNamedQuery("Store.findAll", Store.class);
        List<Store> storesList = q.getResultList();
        
      
        for (int i=0;i<storesList.size();i++){
            
        jComboBox1.addItem(storesList.get(i).getName());
        
        }
        
        
    }
    
    
    
    
    
    
    public void fillProductsList(){ //Γεμίζει τη λίστα με όλα τα υπάρχοντα προϊόντα, αριστερά
        TypedQuery<Product> q = em.createNamedQuery("Product.findAll", Product.class);
        
        List<Product> productsList = q.getResultList();
               
        List<String> products = new ArrayList<String>();
        
        DefaultListModel model = new DefaultListModel();
        
        for(int i=0;i<productsList.size();i++){
            
            model.addElement(productsList.get(i).getName());
            
        }
        
        jList3.setModel(model);
        
        
        
        ArrayList<String> list2 = new ArrayList();
        ArrayList<String> list3 = new ArrayList();
        
        
        for (int i=0;i<jList2.getModel().getSize();i++)
        {
            list2.add((String) jList2.getModel().getElementAt(i));
            
        }
           
        for (int i=0;i<jList3.getModel().getSize();i++)
        {
            list3.add((String) jList3.getModel().getElementAt(i));
            
        }
        
        list3.removeAll(list2);
        
        model.clear();
        
       for(int i=0;i<list3.size();i++){
            
            model.addElement(list3.get(i));
            
        }
       
        
        jList3.setModel(model);
       
        
        
    }
    

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.persistence.EntityManager SuperMarketPUEntityManager;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JList jList2;
    private javax.swing.JList jList3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private java.util.List<model.Product> productList;
    private javax.persistence.Query productQuery;
    private java.util.List<model.Store> storeList;
    private java.util.List<model.Store> storeList1;
    private javax.persistence.Query storeQuery;
    private javax.persistence.Query storeQuery1;
    // End of variables declaration//GEN-END:variables
}
